LINK = gcc -Wall -O3 -o
COMP = gcc -Wall -O3 -c

OBJ = Processor.o Cube.o CubeLife.o

CubeLife: $(OBJ)
	$(LINK) CubeLife $(OBJ)

CubeLife.o: CubeLife.c Processor.h Cube.h
	$(COMP) CubeLife.c

Processor.o: Processor.c Processor.h
	$(COMP) Processor.c

Cube.o: Cube.c Cube.h
	$(COMP) Cube.c

run:
	time ./CubeLife

del:
	rm -f CubeLife $(OBJ) Makefile~

all:
	make
	make run
